using System;
using System.Diagnostics;
using System.Globalization;

namespace Atomic.Clusters
{
	[Serializable]
	[DebuggerDisplay("{DebuggerDisplay}")]
	public class ClusterExpansionTerm
	{
		public ClusterExpansionTerm(ClusterClass cluster, double coefficient)
		{
			Cluster = cluster;
			Coefficient = coefficient;
		}

		public override string ToString()
		{
			return string.Format(CultureInfo.InvariantCulture, "Points = {0}, Multiplicity = {1}, MaxDistance = {2:f4}, Coefficient = {3:f6}", Cluster.Points.Count, Cluster.Multiplicity, Cluster.MaxDistance, Coefficient);
		}

		/// <summary>
		/// The cluster $\alpha$.
		/// </summary>
		public ClusterClass Cluster
		{
			get;
			private set;
		}

		/// <summary>
		/// Effective cluster interaction (ECI) expansion coefficient $J_\alpha$ in eV.
		/// </summary>
		public double Coefficient
		{
			get;
			private set;
		}

		private string DebuggerDisplay
		{
			get
			{
				return ToString();
			}
		}
	}
}
